<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1" >
        <style>
        body{
          margin: 0;
          padding: 0;
          background-color: #000;
          font-size: 12px;
        }
        .iphone{
          width: 340px;
          height:540px;
          background-color: #fff;
          position: absolute;
          left: 50%;
          top: 50%;
          margin: -270px 0 0 -170px;
        }

          </style>

    </head>
    <link rel="stylesheet" href="../css/H5ComponentBase.css">
    <script type="text/javascript" src="../js/lib/jquery.js"></script>
    <body>

      <div class="iphone">

      </div>
      <script type="text/javascript" src="../js/H5ComponentBase.js">
      </script>
      <script>
        var cfg = {
          type:'base',
          bg:'../imgs/p1_people.png',
          width:514,
          height:306,
          css:{
            left:50,
            top:50,
            opacity:0
          },
          animateIn:{bottom:80,opacity:1},
          animateOut:{bottom:0,opacity:0},
          center:true
        }
        var base = new H5ComponentBase('myName',cfg);
        $('.iphone').append(base);

        var leave = true;
        $('body').click(function(){
          leave=!leave;
          $('.h5_component').trigger(leave? "onLeave":"onLoad")
        });
      </script>
    </body>
</html>